<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
  <title>check_prefix (FprExdCmd)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
  <pre><span class="ruby-comment cmt"># File lib/fpr_exd.rb, line 210</span>
        <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">check_prefix</span> <span class="ruby-identifier">prefix_filter</span>
                <span class="ruby-identifier">prefix_filter</span> = <span class="ruby-identifier">prefix_filter</span><span class="ruby-operator">+</span><span class="ruby-value str">&quot;/&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">prefix_filter</span>.<span class="ruby-identifier">end_with?</span>(<span class="ruby-value str">&quot;/&quot;</span>)
                <span class="ruby-identifier">prefix_filter</span> = <span class="ruby-node">&quot;#{prefix_filter}(.*)&quot;</span>
                <span class="ruby-identifier">prefix</span>= <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">prefix_filter</span>,<span class="ruby-keyword kw">true</span>)
                <span class="ruby-ivar">@files</span>.<span class="ruby-identifier">collect!</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
                        <span class="ruby-identifier">file</span> =<span class="ruby-value str">''</span>
                        <span class="ruby-identifier">matchdata</span> = <span class="ruby-identifier">prefix</span>.<span class="ruby-identifier">match</span>(<span class="ruby-identifier">i</span>)
                        <span class="ruby-identifier">file</span> = <span class="ruby-identifier">matchdata</span>[<span class="ruby-value">1</span>]  <span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">matchdata</span>)
                        <span class="ruby-identifier">file</span> = <span class="ruby-identifier">i</span> <span class="ruby-keyword kw">if</span> (<span class="ruby-operator">!</span><span class="ruby-identifier">matchdata</span>)
                        <span class="ruby-identifier">file</span>
                }
                <span class="ruby-identifier">puts</span> <span class="ruby-ivar">@files</span>

        <span class="ruby-keyword kw">end</span></pre>
</body>
</html>